<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <title>Document</title>
    
</head>
<body>
    <div id="app"></div>
</body>
    <script src="https://unpkg.com/vue@next"></script>
    <script>
       const myMixin = {  
            custom: ' myMixin：custom --> hello mixin',
      }
       
        const app = Vue.createApp({
            custom: 'app:custom --> Hello vue.js',
            mixins:[myMixin],
          
                template:`
                <div>{{this.$options.custom}}</div>
                `,
            })
            //自定义选项合并策略实现
            app.config.optionMergeStrategies.custom = (toVal,fromVal) => {
                console.log(fromVal + '=' + toVal)
                return toVal || fromVal
            }

           const vm = app.mount("#app");
    </script>
</html>